<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的留言板</title>
    <style>
        .wrap{
            width: 900px;
            margin: 50px auto 0;
            text-align: center;
        }
        .wrap .board{
            width: 500px;
            height: 500px;
            border: 1px solid #ddd;
            margin: 30px auto;
            padding: 30px;
            box-sizing: border-box;
        }
        .add{
            width: 100px;
            height: 30px;
            text-align: center;
            line-height: 30px;
            border: 1px solid green;
            margin-left: 200px;
        }
        .tip{
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .delete{
            width: 100px;
            height: 30px;
            text-align: center;
            line-height:30px;
            border: 1px solid red;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <div>留言展示</div>
        <div class="board">
            <div class="tip">
                <div>这是我第一条留言</div>
                <div class="delete" onclick="deleteMsg()">删除留言</div>
            </div>
        </div>
        <div class="add" onclick="addMsg()">增加留言</div>
    </div>
</body>
<script>
    function deleteMsg() {
        var request=new XMLHttpRequest();
        request.open('POST','./delete.php')
        request.send( null );
    }
    function addMsg() {
        var request=new XMLHttpRequest();
        request.open('POST','./add.php')
        request.send( null );
    }
</script>
</html>